#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from django.template.context import Context

def render_add_item(context, document):
    t = template.loader.get_template("upload/tags/add_item.html")
    return t.render(Context({'document': document}))

def render_add_document_item(context, module_part, module_term):
    t = template.loader.get_template("upload/tags/add_document_item.html")
    return t.render(Context({'module_part': module_part, 'module_term':module_term}))

def render_show_item(context, item):
    t = template.loader.get_template("upload/tags/show_item.html")
    context['upload'] = item.upload
    return t.render(context)